package com.csd.service.impl;

import com.csd.mapper.CarMapper;
import com.csd.po.Car;
import com.csd.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 车辆信息业务层实现类
 *
 * @author junlong
 * @date 2020/12/22 23:35
 */
@Service
public class CarServiceImpl implements CarService {
    @Autowired
    private CarMapper carMapper;
    /**
     * 租金排序
     * @param cid
     */
    @Override
    public List<Car> findCarByCid(Integer cid) {
        return carMapper.findCarByCid(cid);
    }

    /**
     * 热度排序
     * @param getid
     */
    @Override
    public List<Car> findCarByNumber(Integer getid) {
        return carMapper.findCarByNumber(getid);
    }

    @Override
    public Car findCarByIid(int cid) {
        return carMapper.findCarByIid(cid);
    }
}
